﻿@model IEnumerable<sgp.Models.PessoaJuridica>

@{
    ViewBag.Title = "Index";
}

<legend>
<table border="0" width="100%" cellpadding="5">
    <tr>
        <td>
            <b>Empresas Cadastradas</b>
        </td>
    </tr>
     <tr>
        <td>
        <a class="btn btn-primary btn-primary pull-left" href="/PessoaJuridica/Create" data-original-title="">Adicionar</a>
        <td>
    
    </tr>
</table>
</legend>

@using (Html.BeginForm())
{
    <div>
        @Html.DropDownList("tipoDoadorId" ,new SelectList(ViewBag.TipoDoador, "Id", "Nome"),"Todos")
        <input class="btn btn-info " type="submit" value="Filtrar" />
    </div>
}


<table class="table table-bordered table-striped" width="100%" cellspacing="0" cellpadding="0" 
border="0">

<tr>
        <th>
            
                Nome
            
        </th>
        <th>

            
                Email
            
        </th>
        <th>
            
                Paroquia/Comunidade
            
        </th>
        <th>
            
                Tipo de Doador
            
        </th>
        <th>
            
                Contato
           
        </th>
        <th>
            Telefone
        </th>
        <th>
            Ações
        </th>
   </tr>

@foreach (var item in Model)
{
    
    
    <tr>
        <td>
            
                @Html.DisplayFor(modelItem => item.Nome)
            
        </td>
        <td>
            
                @Html.DisplayFor(modelItem => item.Email)
            
        </td>
        <td>
            
            
                 @Html.DisplayFor(modelItem => item.Setor.Nome)

            
                
        </td>
        <td>

            
                @Html.DisplayFor(modelItem => item.TipoDoador.Nome)
            
        </td>
        <td>
        
            @Html.DisplayFor(modelItem => item.Contato)
        
     </td>
        <td>
            
            @Html.DisplayFor(modelItem => item.Telefone)
            
            
        
        </td>


        <td>
            <a class="btn" href="/PessoaJuridica/Edit/@item.Id" data-original-title="Editar"> <i class="icon-edit"></i></a>
            <a class="btn" href="/PessoaJuridica/Details/@item.Id" data-original-title="Detalhar"> <i class="icon-file"></i></a>
            <a class="btn btn-danger" href="/PessoaJuridica/Delete/@item.Id" data-original-title="Deletar"><i class="icon-remove icon-white"></i></a>
        </td>
       
    </tr>
   
}
</table>




















      @*<tr>
          <th> 
          <b>
            Nome
           </b>
            <div>
                @Html.DisplayFor(modelItem => item.Nome)
            </div>

          </th>
        <th>
            <b>
            CNPJ
            </b>

            <div>
            @Html.DisplayFor(modelItem => item.Cnpj)
            </div>
        </th>
        <th>
            <b>
            Email
            </b>
        <div>
        @Html.DisplayFor(modelItem => item.Email)
        </div>
            
        </th>

        <th>
            <b>
                Data nascimento
            </b>
            <div>
            @Html.DisplayFor(modelItem => item.DataNascimento)
            </div>

        </th>
        <th>
            <b>
             Endereço
            </b>
            <div>
           
            @Html.DisplayFor(modelItem => item.Endereco.Estado)
            </div>
        
        </th>
     </tr>

    </table>
        @*<td>
            @Html.ActionLink("Editar", "Edit", new { id = item.Id }) |
            @Html.ActionLink("Detalhar", "Details", new { id = item.Id }) |
            @Html.ActionLink("Deletar", "Delete", new { id = item.Id })
        </td>*@
 
    

